home *** CD-ROM | disk | FTP | other *** search
- global HARP, TIGO, HORN, DRUM, CHIME, BASS, sPALETTE, gObjects, gOBJECTSD, gWorld, gPuppetlines, sQTCharSprite, gNextEnvLetter, gMIDIPlayTRUE, gInitalized, noteObjs, windowsMIDIXObj, xNAVXOBJ, xCURXOBJ, gCPU, gFileSep, gRootPath, gHDpath, gXobjs, gXOBJPath, gCDpath, gCDName
-
- on makeHarpChaotic
- set HOBJ to getaProp(gObjects, #HARP)
- AddObjects([#HarpToChoasAnim])
- ChangeSpecialState(#HARP, #Chaotic)
- eraseRecording(#HARP)
- end
-
- on harpString RefNum
- set startMouseH to the mouseH
- set startMouseV to the mouseV
- set OBj to getaProp(gObjects, RefNum)
- set SpriteNum to getaProp(OBj, #SpriteNum)
- set StringNum to getaProp(OBj, #StringNum)
- set acastnumL to getaProp(getaProp(OBj, #cast), #left)
- set acastnumR to getaProp(getaProp(OBj, #cast), #right)
- set Dummy to getaProp(gObjects, #HarpDumbString)
- set DumbNum to getaProp(Dummy, #SpriteNum)
- set lastMouseH to startMouseH
- set lastMouseV to startMouseV
- set startcast to getaProp(getaProp(OBj, #cast), getaProp(OBj, #DisplayState))
- if the castNum of sprite SpriteNum = acastnumL then
- set startLeft to the left of sprite SpriteNum
- set startTop to the top of sprite SpriteNum
- set startRight to the right of sprite SpriteNum
- set startBottom to the bottom of sprite SpriteNum
- else
- set startRight to the left of sprite SpriteNum
- set startTop to the top of sprite SpriteNum
- set startLeft to the right of sprite SpriteNum
- set startBottom to the bottom of sprite SpriteNum
- end if
- repeat while the mouseDown
- set mH to the mouseH
- set mV to the mouseV
- if (mH = lastMouseH) and (mV = lastMouseV) then
- next repeat
- end if
- if StringNum <> 1 then
- set OffsetH to mH - startMouseH
- set OffsetV to mV - startMouseV
- if OffsetH > 20 then
- set mH to startMouseH + 20
- else
- if OffsetH < -20 then
- set mH to startMouseH - 20
- end if
- end if
- if OffsetV > 20 then
- set mV to startMouseV + 20
- else
- if OffsetV < -20 then
- set mV to startMouseV - 20
- end if
- end if
- end if
- set lastMouseH to mH
- set lastMouseV to mV
- if ((mH > startLeft) and (mV > startTop)) or ((mH < startLeft) and (mV < startTop)) then
- set the castNum of sprite SpriteNum to acastnumL
- else
- set the castNum of sprite SpriteNum to acastnumR
- end if
- spriteBox(SpriteNum, startLeft, startTop, mH, mV)
- if ((startRight > mH) and (startBottom > mV)) or ((startRight < mH) and (startBottom < mV)) then
- set the castNum of sprite DumbNum to acastnumL
- else
- set the castNum of sprite DumbNum to acastnumR
- end if
- spriteBox(DumbNum, mH, mV, startRight, startBottom)
- CursorandUpdate()
- end repeat
- set halfTone to indexedNoteInInstrumentScale(HARP, 13 - StringNum)
- set note to 60 + halfTone - 1
- noteOn(#HARP, note, 127)
- set noteOnTime to the ticks
- spriteBox(DumbNum, -2000, -2000, -50, -50)
- set the castNum of sprite SpriteNum to startcast
- spriteBox(SpriteNum, startLeft, startTop, startRight, startBottom)
- updateStage()
- repeat while the ticks < (noteOnTime + 90)
- CursorandUpdate()
- end repeat
- noteOff(#HARP, note)
- if (StringNum = 1) and ((mH > 500) or (mH < 50)) then
- makeHarpChaotic()
- end if
- end
-
- on playChaoticHarp OBJref
- set OBj to getaProp(gObjects, OBJref)
- PlayNoteFromHitMap(#HARP)
- end
-